feat(mobile): add range text selection to message details - #5320
Conversation
Add a Select text action under Copy message in the message details sheet. It opens a child page-sheet that reuses SelectableText to show the copyable body for platform range selection. Project canSelectText from getMessageDetailsContent: true only when the message has copyable text and no part is in flight. A user text part never streams; an assistant text part is in flight only when time exists without end. Reasoning and tool parts reuse isPartStreaming.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryIncremental review of commit Files Reviewed (2 files)
Previous Review Summaries (2 snapshots, latest commit ec6c923)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit ec6c923)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryIncremental review of the follow-up commit (swap details sheet content instead of nesting a second Modal): the single-Modal refactor makes the Android hardware back button dismiss the whole details sheet while in the Select text view, whereas the view's "Done" button and the previous child-Modal behavior returned to the details view. Overview
Issue Details (click to expand)WARNING
Files Reviewed (3 files)
Fix these issues in Kilo Cloud Previous review (commit 81c9f1b)Status: No Issues Found | Recommendation: Merge Executive SummaryReviewed the range text selection feature for the mobile message details sheet (5 files, +485/-64): the Files Reviewed (5 files)
Reviewed by kimi-k3 · Input: 48.1K · Output: 2.9K · Cached: 175.3K Review guidance: REVIEW.md from base branch |
…odal A second pageSheet Modal rendered as a sibling of the already-presented details pageSheet never presents on iOS. Swap the single Modal's content: when Select text is tapped, the details Modal renders the select view (SheetHeader 'Select text' plus the selectable body) in place of the details content. Select text Done returns to details; details Done closes the sheet.
The single details Modal closed the whole sheet on Android hardware back even while the Select text view was shown, inconsistent with the Done button. Route onRequestClose back to the details view when selectVisible is true.
Summary
The user can now select a range of text in the mobile agent chat. Long-press still opens the message details sheet. A new "Select text" action under "Copy message" swaps the details sheet to a "Select text" view that shows the copyable message body in a read-only selectable field. The user selects a range and uses the platform copy callout.
For the product manager: the app gains a "Select text" action on the message details sheet for finished messages with copyable text. A streaming message hides the action; a message with no copyable text shows neither "Copy message" nor "Select text".
For the maintainer:
getMessageDetailsContentnow projectscanSelectText, true only when the message has copyable text and no part is in flight. A user text part never streams; an assistant text part is in flight only whentimeexists withoutend. Reasoning and tool parts reuseisPartStreaming. A newMessageTextSelectSheetcontent view reusesSelectableTextand swaps into the single details Modal.Verification
pnpm typecheck,pnpm lint,pnpm format:checkpass inapps/mobile.Visual Changes
The details sheet gains a "Select text" action under "Copy message":
Tapping it swaps the sheet to a read-only selectable view of the message body:
Reviewer Notes
pageSheetnever presents on iOS). E2E S2 is the live check.No human steps are needed.